Service
Tip
The OpenAPI described in this document applies to K8s YAML services.
# Get Service List
# Test Service
Request
GET /openapi/service/yaml/services?projectKey=<projectKey>
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Response Description
| Parameter Name | Type | Description |
|---|---|---|
service_name | string | Service name |
type | string | Service type, fixed value k8s |
containers | []Container | List of service components |
Container Parameter Description
| Parameter Name | Type | Description |
|---|---|---|
name | string | Service component name |
image | string | Service component image |
image_name | string | Service component image name |
Response Example
Details
{
"service": [
{
"service_name": "service-1",
"type": "k8s",
"containers": [
{
"name": "myapp-1",
"image": "koderover.tencentcloudcr.com/koderover-demo/myapp-1:v0.1__linux_amd64",
"image_name": "myapp-1"
}
]
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Production Service
Request
GET /openapi/service/yaml/production/services?projectKey=<projectKey>
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Response Description
| Parameter Name | Type | Description |
|---|---|---|
service_name | string | Service name |
type | string | Service type, fixed value k8s |
containers | []Container | List of service components |
Container
| Parameter Name | Type | Description |
|---|---|---|
name | string | Service component name |
image | string | Service component image |
image_name | string | Service component image name |
Response Example
Details
[
{
"service_name": "service-1",
"type": "k8s",
"containers": [
{
"name": "myapp-1",
"image": "koderover.tencentcloudcr.com/koderover-demo/myapp-1:v0.1__linux_amd64",
"image_name": "myapp-1"
}
]
}
]
2
3
4
5
6
7
8
9
10
11
12
13
# Get Service Details
# Test Service
Request
GET /openapi/service/yaml/:serviceName?projectKey=<projectKey>
Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Response Description
| Parameter Name | Type | Description |
|---|---|---|
service_name | string | Service name |
created_by | string | Service creator |
created_time | int | Service creation time |
type | string | Service type, fixed value k8s |
containers | []Container | Service component list |
service_variable_kvs | []KeyVal | Service variable list |
yaml | string | Service configuration YAML content |
Container Parameter Description
| Parameter Name | Type | Description |
|---|---|---|
name | string | Service component name |
image | string | Service component image |
image_name | string | Service component image name |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
type | Variable value type, there are four types: bool, string, enum, yaml | string | Yes |
options | Variable optional value list, this field has meaning when type is enum | []string | No |
desc | Variable description information | String | No |
Response Example
Details
{
"service_name": "service2",
"type": "k8s",
"created_by": "admin",
"created_time": 1689660993,
"yaml": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: service2\n labels: \n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\n hello: test\nspec:\n selector:\n matchLabels:\n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\n replicas: 1\n template:\n metadata: \n labels:\n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\n hello: {{.world}}\n spec:\n containers:\n - name: service2\n image: koderover.******.com/koderover-demo/service2:latest\n imagePullPolicy: Always \n command:\n - /workspace/service2\n ports:\n - protocol: TCP\n containerPort: {{.port}}\n resources:\n limits:\n memory: {{.memoryLimit}}\n cpu: {{.cpuLimit}}\n---\napiVersion: v1\nkind: Service\nmetadata:\n name: service2\n labels:\n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\nspec:\n type: NodePort\n ports:\n - protocol: TCP\n port: {{.port}}\n targetPort: {{.port}}",
"containers": [
{
"name": "service2",
"image": "koderover.******.com/koderover-demo/service2:latest",
"image_name": "service2"
}
],
"service_variable_kvs": [
{
"key": "cpuLimit",
"value": "55m",
"type": "string",
"options": [],
"desc": ""
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Production Service
Request
GET /openapi/service/yaml/production/:serviceName?projectKey=<projectKey>
Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Response Description
| Parameter Name | Type | Description |
|---|---|---|
service_name | string | Service name |
created_by | string | Service creator |
created_time | int | Service creation time |
type | string | Service type, fixed value k8s |
containers | []Container | Service component list |
service_variable_kvs | []KeyVal | Service variable list |
yaml | string | Service configuration YAML content |
Container Parameter Description
| Parameter Name | Type | Description |
|---|---|---|
name | string | Service component name |
image | string | Service component image |
image_name | string | Service component image name |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
type | Variable value type, there are four types: bool, string, enum, yaml | string | Yes |
options | Variable optional value list, this field has meaning when type is enum | []string | No |
desc | Variable description information | String | No |
Response Example
Details
{
"service_name": "service2",
"type": "k8s",
"created_by": "admin",
"created_time": 1689660993,
"yaml": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: service2\n labels: \n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\n hello: test\nspec:\n selector:\n matchLabels:\n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\n replicas: 1\n template:\n metadata: \n labels:\n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\n hello: {{.world}}\n spec:\n containers:\n - name: service2\n image: koderover.******.com/koderover-demo/service2:latest\n imagePullPolicy: Always \n command:\n - /workspace/service2\n ports:\n - protocol: TCP\n containerPort: {{.port}}\n resources:\n limits:\n memory: {{.memoryLimit}}\n cpu: {{.cpuLimit}}\n---\napiVersion: v1\nkind: Service\nmetadata:\n name: service2\n labels:\n app.kubernetes.io/name: ai-test-2\n app.kubernetes.io/instance: service2\nspec:\n type: NodePort\n ports:\n - protocol: TCP\n port: {{.port}}\n targetPort: {{.port}}",
"containers": [
{
"name": "service2",
"image": "koderover.******.com/koderover-demo/service2:latest",
"image_name": "service2"
}
],
"service_variable_kvs": [
{
"key": "cpuLimit",
"value": "55m",
"type": "string",
"options": [],
"desc": ""
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Get Service Labels
Request
GET /openapi/service/yaml/:serviceName/labels?projectKey=<projectKey>
Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Response Example
Correct return
[
{
"key": "key",
"value": "value"
},
...
]
2
3
4
5
6
7
Error return
{
"code": 500,
"description": "...",
"message": "Internal Error"
}
2
3
4
5
# Create New Service Using Template
# Test Service
Request
POST /openapi/service/template/load/yaml
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
service_name | Service name | string | Yes |
project_key | Project key | string | Yes |
template_name | K8s Yaml Template Name | string | Yes |
auto_sync | Auto sync switch | bool | No |
variable_yaml | Template variable information | []KeyVal | No |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key value | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
Body Parameter Example
Use template microservice-template to create service service1 for project demo:
Details
{
"service_name": "service1",
"project_key":"demo",
"template_name": "microservice-template",
"auto_sync": true,
"variable_yaml": [
{
"key": "cpuLimit",
"value": "100m"
},
{
"key": "memoryLimit",
"value": "100Mi"
},
{
"key": "port",
"value": "20221"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Return
{
"message": "success"
}
2
3
# Production Service
Request
POST /openapi/service/template/production/load/yaml
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
service_name | Service name | string | Yes |
yaml | Service YAML content | string | Yes |
project_key | Project key | string | Yes |
template_name | K8s Yaml Template Name | string | Yes |
auto_sync | Auto sync switch | bool | No |
variable_yaml | Template variable information | []KeyVal | No |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key value | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
Body Parameter Example
Use template base-template to create service service1 for project demo:
Details
{
"service_name": "service1",
"production":true,
"project_key":"demo",
"template_name":"base-template",
"auto_sync":true,
"variable_yaml":[
{
"key":"cpuLimit",
"value":"15m"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
Return
{
"message": "success"
}
2
3
# Create New Service Manually
# Test Service
Request
POST /openapi/service/yaml/raw?projectKey=<projectKey>
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
service_name | Service name | string | Yes |
yaml | Service YAML content | string | Yes |
variable_yaml | yaml variable information | []KeyVal | No |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
type | Variable value type, there are four types: bool, string, enum, yaml | string | Yes |
options | Variable optional value list, this field has meaning when type is enum | []string | No |
desc | Variable description information | String | No |
Body Parameter Example
Details
{
"service_name":"service-3",
"yaml":"apiVersion: v1\nkind: Service\nmetadata:\n name: a\n labels:\n app: a\nspec:\n ports:\n - name: http\n port: 80\n targetPort: 8080\n selector:\n app: a\n\n---\n\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: a\n labels:\n app: a\nspec:\n selector:\n matchLabels:\n app: a\n replicas: 1\n template:\n metadata:\n labels:\n app: a\n spec:\n containers:\n - name: myapp-1\n image: koderover.******.com/koderover-demo/myapp-1:v0.1__linux_amd64\n imagePullPolicy: Always\n command: [\"/myapp-1\"]\n args: [\"--downstream-addr\", \"$(DOWNSTREAM_ADDR)\", \"--headers\", \"$(HEADERS)\"]\n env:\n - name: DOWNSTREAM_ADDR\n value: \"b\"\n - name: HEADERS\n value: \"x-request-id\"\n ports:\n - containerPort: 8080\n resources:\n limits:\n cpu: {{.cpu}}\n memory: 122Mi\n",
"variable_yaml":[
{
"key":"cpu",
"value":"12m",
"desc":"cpu value",
"type":"string"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
Return
{
"message": "success"
}
2
3
# Production Service
Request
POST /openapi/service/yaml/production/raw?projectKey=<projectKey>
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
service_name | Service name | string | Yes |
yaml | Service YAML content | string | Yes |
variable_yaml | yaml variable information | []KeyVal | No |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
type | Variable value type, there are four types: bool, string, enum, yaml | string | Yes |
options | Variable optional value list, this field has meaning when type is enum | []string | No |
desc | Variable description information | String | No |
Body Parameter Example
Details
{
"service_name":"service-3",
"yaml":"apiVersion: v1\nkind: Service\nmetadata:\n name: a\n labels:\n app: a\nspec:\n ports:\n - name: http\n port: 80\n targetPort: 8080\n selector:\n app: a\n\n---\n\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: a\n labels:\n app: a\nspec:\n selector:\n matchLabels:\n app: a\n replicas: 1\n template:\n metadata:\n labels:\n app: a\n spec:\n containers:\n - name: myapp-1\n image: koderover.******.com/koderover-demo/myapp-1:v0.1__linux_amd64\n imagePullPolicy: Always\n command: [\"/myapp-1\"]\n args: [\"--downstream-addr\", \"$(DOWNSTREAM_ADDR)\", \"--headers\", \"$(HEADERS)\"]\n env:\n - name: DOWNSTREAM_ADDR\n value: \"b\"\n - name: HEADERS\n value: \"x-request-id\"\n ports:\n - containerPort: 8080\n resources:\n limits:\n cpu: {{.cpu}}\n memory: 122Mi\n",
"variable_yaml":[
{
"key":"cpu",
"value":"12m",
"desc":"cpu value",
"type":"string"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
Return
{
"message": "success"
}
2
3
# Create K8s YAML Service from Code Repository
Request
POST /openapi/service/loader/load?codehostName=<codehostName>&repoName=<repoName>&branchName=<branchName>&remoteName=<remoteName>&repoOwner=<repoOwner>&namespace=<namespace>&production=<production>
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
codehostName | string | Code source name | Yes |
repoName | string | Repository name | Yes |
branchName | string | Branch where the service configuration is located | Yes |
remoteName | string | Git remote name used for Gerrit, Gitee, and Gitee Enterprise; defaults to origin when empty | No |
repoOwner | string | Repository owner or organization | Yes |
namespace | string | GitHub/GitLab repository namespace. If empty, repoOwner is used | No |
production | bool | Whether to create a production service. Only true creates a production service; defaults to false | No |
Body Parameters
| Parameter Name | Description | Type | Required |
|---|---|---|---|
product_name | Project Key | string | Yes |
service_paths | Service path list | []LoadServicePath | Yes |
LoadServicePath Parameters
| Parameter Name | Description | Type | Required |
|---|---|---|---|
service_name | Service name | string | Yes |
path | Relative path of the service configuration file or directory. When is_dir is true, an empty string selects the repository root | string | Conditional |
is_dir | Whether the path is a directory. true loads a directory and false loads one YAML file; defaults to false | bool | No |
Request Example
Create a test service for project demo from the main branch of codehost github-demo:
POST /openapi/service/loader/load?codehostName=github-demo&repoName=demo&branchName=main&repoOwner=koderover&production=false
Body Parameter Example
Details
{
"product_name": "demo",
"service_paths": [
{
"service_name": "backend",
"path": "services/backend/deployment.yaml",
"is_dir": false
}
]
}
2
3
4
5
6
7
8
9
10
Response
{
"message": "success"
}
2
3
# Create Helm Service
Create Helm services from a code repository, public repository, or Chart repository.
Request
POST /openapi/service/helm/load?projectKey=<projectKey>
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Body Parameters
| Parameter Name | Description | Type | Required |
|---|---|---|---|
source | Service source enum. See the value mapping below | string | Yes |
production | Whether to create a production service; defaults to false | bool | No |
createFrom | Service source configuration. See the following sections for fields by source | object | Yes |
source Values
| Value | Meaning |
|---|---|
repo | An integrated GitHub, GitLab, or generic Git code source of type other |
gerrit | An integrated Gerrit code source |
gitee | An integrated Gitee code source |
gitee-enterprise | An integrated Gitee Enterprise code source |
publicRepo | A public GitHub repository |
chartRepo | An integrated Chart repository |
createFrom Parameters for Integrated Code Sources
This applies when source is repo, gerrit, gitee, or gitee-enterprise.
| Parameter Name | Description | Type | Required |
|---|---|---|---|
codehostName | Code source name | string | Yes |
owner | Repository owner or organization | string | Yes |
namespace | Repository namespace, used for multi-level GitLab groups. If empty, owner is used | string | No |
repo | Repository name | string | Yes |
branch | Branch name | string | Yes |
paths | Chart path list. Multiple paths are supported | []string | Yes |
createFrom Parameters When source Is publicRepo
| Parameter Name | Description | Type | Required |
|---|---|---|---|
repoLink | Public repository URL | string | Yes |
paths | Chart path list. Multiple paths are supported | []string | Yes |
createFrom Parameters When source Is chartRepo
| Parameter Name | Description | Type | Required |
|---|---|---|---|
chartRepoName | Chart repository name | string | Yes |
chartName | Chart name | string | Yes |
chartVersion | Chart version constraint. If empty, no version is specified and Helm resolves an available version | string | No |
Body Parameter Example
Create a Helm service for project demo from the main branch of codehost github-demo:
Details
{
"source": "repo",
"production": false,
"createFrom": {
"codehostName": "github-demo",
"owner": "koderover",
"repo": "helm-charts",
"branch": "main",
"paths": [
"charts/backend"
]
}
}
2
3
4
5
6
7
8
9
10
11
12
13
Response Description
| Parameter Name | Description | Type |
|---|---|---|
successServices | List of services created successfully | []string |
failedServices | List of services that failed to create | []FailedHelmService |
FailedHelmService Parameters
| Parameter Name | Description | Type |
|---|---|---|
path | Chart path that failed | string |
error | Failure reason | string |
Response Example
Details
{
"successServices": [
"backend"
],
"failedServices": []
}
2
3
4
5
6
# Update Service Configuration
# Test Service
# Request
PUT /openapi/service/yaml/:serviceName?projectKey=<project_name>
# Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
# Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
# Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
type | Service type, specify as k8s | string | Yes |
yaml | Service configuration YAML content | string | Yes |
Body Parameter Example
Details
{
"type":"k8s",
"yaml":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: service1\n labels: \n app.kubernetes.io/name: demo\n app.kubernetes.io/instance: service1\nspec:\n selector:\n matchLabels:\n app.kubernetes.io/name: demo\n app.kubernetes.io/instance: service1\n replicas: 1\n template:\n metadata: \n labels:\n app.kubernetes.io/name: demo\n app.kubernetes.io/instance: service1\n spec:\n containers:\n - name: service1\n image: koderover.******.com/koderover-demo/service1:latest\n imagePullPolicy: Always \n command:\n - /workspace/service1\n ports:\n - protocol: TCP\n containerPort: {{.port}}\n resources:\n limits:\n memory: {{.memoryLimit}}\n cpu: {{.cpuLimit}}\n---\napiVersion: v1\nkind: Service\nmetadata:\n name: service1\n labels:\n app.kubernetes.io/name: yaml-poc\n app.kubernetes.io/instance: service1\nspec:\n type: NodePort\n ports:\n - protocol: TCP\n port: {{.port}}\n targetPort: {{.port}}\n",
}
2
3
4
# Return
{
"message": "success"
}
2
3
# Production Service
Request
PUT /openapi/service/yaml/production/:serviceName?projectKey=<project_name>
Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
type | Service type, specify as k8s | string | Yes |
yaml | Service configuration YAML content | string | Yes |
Body Parameter Example
Details
{
"type":"k8s",
"yaml":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: service1\n labels: \n app.kubernetes.io/name: demo\n app.kubernetes.io/instance: service1\nspec:\n selector:\n matchLabels:\n app.kubernetes.io/name: demo\n app.kubernetes.io/instance: service1\n replicas: 1\n template:\n metadata: \n labels:\n app.kubernetes.io/name: demo\n app.kubernetes.io/instance: service1\n spec:\n containers:\n - name: service1\n image: koderover.******.com/koderover-demo/service1:latest\n imagePullPolicy: Always \n command:\n - /workspace/service1\n ports:\n - protocol: TCP\n containerPort: {{.port}}\n resources:\n limits:\n memory: {{.memoryLimit}}\n cpu: {{.cpuLimit}}\n---\napiVersion: v1\nkind: Service\nmetadata:\n name: service1\n labels:\n app.kubernetes.io/name: yaml-poc\n app.kubernetes.io/instance: service1\nspec:\n type: NodePort\n ports:\n - protocol: TCP\n port: {{.port}}\n targetPort: {{.port}}\n",
}
2
3
4
Return
{
"message": "success"
}
2
3
# Update Service Variable
# Test Service
Request
PUT /openapi/service/yaml/:serviceName/variable?projectKey=<projectKey>
Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
service_variable_kvs | Service variable list | []KeyVal | Yes |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
type | Variable value type, there are four types: bool, string, enum, yaml | string | Yes |
options | Variable optional value list, this field has meaning when type is enum | []string | No |
desc | Variable description information | String | No |
Body Parameter Example
Details
{
"service_variable_kvs": [
{
"key":"cpu",
"value":"12m",
"type":"string",
"options":[],
"desc":""
}
]
}
2
3
4
5
6
7
8
9
10
11
Return
{
"message": "success"
}
2
3
# Production Service
Request
PUT /openapi/service/yaml/production/:serviceName/variable?projectKey=<projectKey>
Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
service_variable_kvs | Service variable list | []KeyVal | Yes |
KeyVal Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable key | string | Yes |
value | Variable value, if there is nested value, use json format | any | Yes |
type | Variable value type, there are four types: bool, string, enum, yaml | string | Yes |
options | Variable optional value list, this field has meaning when type is enum | []string | No |
desc | Variable description information | String | No |
Body Parameter Example
Details
{
"service_variable_kvs": [
{
"key":"cpu",
"value":"12m",
"type":"string",
"options":[],
"desc":""
}
]
}
2
3
4
5
6
7
8
9
10
11
Return
{
"message": "success"
}
2
3
# Delete Service
# Test Service
# Request
DELETE /openapi/service/yaml/<serviceName>?projectKey=<projectKey>
# Return
{
"message": "success"
}
2
3
# Production Service
Request
DELETE /openapi/service/yaml/production/:serviceName?projectKey=<projectKey>
Path Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
serviceName | string | Service name | Yes |
Query Parameter Description
| Parameter Name | Type | Description | Required |
|---|---|---|---|
projectKey | string | Project Key | Yes |
Return
{
"message": "success"
}
2
3
# Create Helm Service from Template
Request
POST /openapi/service/template/load/helm?projectKey=<projectKey>
Body Parameters
| Parameter Name | Description | Type | Required |
|---|---|---|---|
project_key | Project Key | string | Yes |
service_name | Service Name | string | Yes |
production | Is Production Environment | bool | No |
template_name | Helm Template Name | string | Yes |
values_yaml | Values YAML Content | string | No |
variables | Template Variable Info | []KeyVal | No |
auto_sync | Auto Sync Switch | bool | No |
KeyVal Parameters
| Parameter Name | Description | Type | Required |
|---|---|---|---|
key | Variable Key | string | Yes |
value | Variable Value, use json format if nested | any | Yes |
Body Parameter Example
Create service api-test for project multi-chart using template general-chart:
Details
{
"auto_sync": true,
"production": false,
"project_key": "multi-chart",
"service_name": "api-test",
"template_name": "general-chart",
"values_yaml": "aa: bb\ncc: dd",
"variables": [
{
"key": "port",
"value": 20012
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
Response
{
"message": "success"
}
2
3


